import java.util.Scanner;
import user.NormalUser;
import user.*;
import Book.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${USER}
 * Date: ${YEAR}-${MONTH}-${DAY}
 * Time: ${TIME}
 */
public class Main {
    public static user login(){
        Scanner scanner=new Scanner(System.in);
        System.out.println("please,输入姓名");
        String name= scanner.nextLine();
        System.out.println("请选择  1.管理员  2.普通用户");
        int a= scanner.nextInt();
        if (a==1){
            return new AdminUser(name);
        }else{
            return new NormalUser(name);
        }
    }
    public static void main(String[] args) {

        booklist booklist=new booklist();
        user User= login();
        while(true) {
            int a = User.menu();
            User.doplay(a, booklist);
        }
    }
}